<template>
    <div class="infinite-container pd10 bgwhite" >
        <div v-html="applyTips.content" v-if="applyTips.content"></div>
        <div class="no-data" v-else>
            {{ '暂无数据'}}
        </div>
    </div>
</template>

<script>
import {commonAjaxJson, RESTFUL_API} from '@/api/api'

export default {
  data () {
    return {
      applyTips:{content:""}
    }
  },
  mounted () {
      const code = this.$route.query.key || ''
      this.informedConsent(code)
  },
  methods:{
      informedConsent (code) {
      const params = {code}
      this.$store.commit("SHOW_LOADING")
      commonAjaxJson(RESTFUL_API.informedConsent, params).then(res => {
        this.$store.commit("HIDE_LOADING")
        if(res.data.code == 200 && res.data.data){
          this.applyTips = res.data.data
          document.title = res.data.data.title
        } else {
          this.$store.commit("UPDATE_TOAST", {
            message: res.data.message || 'KEY有误，请检查'
          });
        }
      })
    }
  }
}
</script>
<style scoped lang="less">
@import '../common/css/vars.less';

.title{
  border-left: 4px solid @color-primary;
  padding:0 10px;
  margin: 10px 0;
}
</style>

